<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>闲置物品</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/reset.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/shiwumain.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/slide.js"></script>
    <script type="text/javascript">
        document.write(page1.import.body.innerHTML);
    </script>

</head>

<body>

<frame  src="top.html" frameborder="no" border="0" framespacing="0"/>
<div class="search_bar clearfix">
    <link rel="import" href="top.html" id="page1"/>
    <a href="websocket.jsp" class="logo fl"><img src="${pageContext.request.contextPath}/images/ershou.png"></a>
    <div class="search_con fl">
        <form action="${pageContext.request.contextPath}/product/queryByName" method="post">
        <input type="text" class="input_text fl" name="p_name" placeholder="搜索闲置物品">
        <input type="submit" class="input_btn fr"  value="搜索">
        </form>
    </div>
    <div class="guest_cart fr">
        <a href="${pageContext.request.contextPath}/favorite/user_favorite" class="cart_name fl">我的收藏</a>
        <div class="goods_count fl" id="show_count">${count}</div>
    </div>
</div>

<div class="navbar_con">
    <div class="navbar">
        <h1 class="fl">全部商品分类</h1>
        <ul class="navlist fl">
            <li class="interval">> </li>
            <li><a href="">当前位置：</a></li>
            <li class="interval"></li>
            <li><a href="${pageContext.request.contextPath}/index/ToIndex">首页</a></li>
            <li class="interval">> </li>
            <li><a href="">闲置物品交易</a></li>

        </ul>
    </div>
</div>

<div class="center_con clearfix">
    <ul class="subnav fl">
        <c:forEach items="${ProductTypes}" var="ProductTypes">
            <li><a href="${pageContext.request.contextPath}/product/getProductByType1?t_id=${ProductTypes.t_id}" class="fruit">${ProductTypes.type}</a></li>
        </c:forEach>
    </ul>
    <div class="slide fl">
        <ul class="slide_pics">
            <c:forEach items="${pictures}" var="pictures">

            <li><img src="${pictures.picture}" alt="幻灯片"></li>

            </c:forEach>
        </ul>
        <div class="prev"></div>
        <div class="next"></div>
        <ul class="points"></ul>
    </div>
    <div class="adv1 fl">
        <ul class="subnav fl">
            <c:forEach items="${ProductType}" var="ProductType">
    <li><a href="${pageContext.request.contextPath}/product/getProductByType1?t_id=${ProductType.t_id}" class="fruit">${ProductType.type}</a></li>
            </c:forEach>
        </ul>
    </div>
</div>

<div class="list_model">
    <div class="list_title clearfix">
        <h3 class="fl" id="model01e1">图书</h3>

        <a href="${pageContext.request.contextPath}/product/query" class="goods_more fr" id="fruit_more">查看更多 ></a>
    </div>

    <div class="goods_con clearfix">
        <div class="goods_banner fl"><img src="${pageContext.request.contextPath}/images/6e2aa8577b1bcaad223e584cd759eb2c.jpg"></div>
        <ul class="goods_list fl">
            <c:forEach items="${book}" var="book">
                <li>
                <h4>${book.p_name}</h4>
                    <a href="${pageContext.request.contextPath}/product/getProductById?pid=${book.pid}">
                    <img src="${book.photo}">
                <div class="prize">¥ ${book.price}元</div></a>
            </li>
            </c:forEach>

        </ul>
    </div>
</div>
<div class="list_model">
    <div class="list_title clearfix">
        <h3 class="fl" id="model002">手机</h3>
        <a href="${pageContext.request.contextPath}/product/query" class="goods_more fr" id="fruit_more">查看更多 ></a>
    </div>

    <div class="goods_con clearfix">
        <div class="goods_banner fl"><img src="${pageContext.request.contextPath}/images/f65397efbd6671d1a3259e071404be24.jpg"></div>
        <ul class="goods_list fl">
            <c:forEach items="${Phone}" var="Phone">
                <li>
                    <h4>${Phone.p_name}</h4>
                    <a href="${pageContext.request.contextPath}/product/getProductById?pid=${Phone.pid}">
                        <img src="${Phone.photo}">
                        <div class="prize">¥ ${Phone.price}元</div></a>
                </li>
            </c:forEach>


        </ul>
    </div>
</div>
<div class="list_model">
    <div class="list_title clearfix">
        <h3 class="fl" id="model01">电脑</h3>

        <a href="${pageContext.request.contextPath}/product/query" class="goods_more fr" id="fruit_more">查看更多 ></a>
    </div>

    <div class="goods_con clearfix">
        <div class="goods_banner fl"><img src="${pageContext.request.contextPath}/images/index.jpg"></div>
        <ul class="goods_list fl">
            <c:forEach items="${Computer}" var="Computer">
                <li>
                    <h4>${Computer.p_name}</h4>
                    <a href="${pageContext.request.contextPath}/product/getProductById?pid=${Computer.pid}">
                        <img src="${Computer.photo}">
                        <div class="prize">¥ ${Computer.price}元</div></a>
                </li>
            </c:forEach>
        </ul>
    </div>
</div>
<div class="list_model">
    <div class="list_title clearfix">
        <h3 class="fl" id="model01">交通工具</h3>

        <a href="${pageContext.request.contextPath}/product/query" class="goods_more fr" id="fruit_more">查看更多 ></a>
    </div>

    <div class="goods_con clearfix">
        <div class="goods_banner fl"><img src="${pageContext.request.contextPath}/images/u=523624843,2321252550&fm=26&gp=0.jpg"></div>
        <ul class="goods_list fl">
            <c:forEach items="${Vehicle}" var="Vehicle">
                <li>
                    <h4>${Vehicle.p_name}</h4>
                    <a href="${pageContext.request.contextPath}/product/getProductById?pid=${Vehicle.pid}">
                        <img src="${Vehicle.photo}">
                        <div class="prize">¥ ${Vehicle.price}元</div></a>
                </li>
            </c:forEach>

        </ul>
    </div>
</div>
<div class="list_model">
    <div class="list_title clearfix">
        <h3 class="fl" id="model01">绘画/乐器</h3>

        <a href="${pageContext.request.contextPath}/product/query" class="goods_more fr" id="fruit_more">查看更多 ></a>
    </div>

    <div class="goods_con clearfix">
        <div class="goods_banner fl"><img src="${pageContext.request.contextPath}/images/u=3235683768,1841175555&fm=26&gp=0.jpg"></div>
        <ul class="goods_list fl">
            <c:forEach items="${Equipment}" var="Equipment">
                <li>
                    <h4>${Equipment.p_name}</h4>
                    <a href="${pageContext.request.contextPath}/product/getProductById?pid=${Equipment.pid}">
                        <img src="${Equipment.photo}">
                        <div class="prize">¥ ${Equipment.price}元</div></a>
                </li>
            </c:forEach>

        </ul>
    </div>
</div>
<div class="list_model">
    <div class="list_title clearfix">
        <h3 class="fl" id="model01">电器/配件</h3>

        <a href="${pageContext.request.contextPath}/product/query" class="goods_more fr" id="fruit_more">查看更多 ></a>
    </div>

    <div class="goods_con clearfix">
        <div class="goods_banner fl"><img src="${pageContext.request.contextPath}/images/index1.jpg"></div>
        <ul class="goods_list fl">
            <c:forEach items="${Electric}" var="Electric">
                <li>
                    <h4>${Electric.p_name}</h4>
                    <a href="${pageContext.request.contextPath}/product/getProductById?pid=${Electric.pid}">
                        <img src="${Electric.photo}">
                        <div class="prize">¥ ${Electric.price}元</div></a>
                </li>
            </c:forEach>
        </ul>
    </div>
</div>
<div class="list_model">
    <div class="list_title clearfix">
        <h3 class="fl" id="model01">生活百货</h3>

        <a href="${pageContext.request.contextPath}/product/query" class="goods_more fr" id="fruit_more">查看更多 ></a>
    </div>

    <div class="goods_con clearfix">
        <div class="goods_banner fl"><img src="${pageContext.request.contextPath}/images/4e6683ab0b2302a0e5a151ab8c974228.jpg"></div>
        <ul class="goods_list fl">
            <c:forEach items="${life}" var="life">
                <li>
                    <h4>${life.p_name}</h4>
                    <a href="${pageContext.request.contextPath}/product/getProductById?pid=${life.pid}">
                        <img src="${life.photo}">
                        <div class="prize">¥ ${life.price}元</div></a>
                </li>
            </c:forEach>
        </ul>
    </div>
</div>


</div>

<div class="footer">
    <div class="foot_link">
        <a href="#">关于我们</a>
        <span>|</span>
        <a href="#">联系我们</a>
        <span>|</span>
        <a href="#">招聘人才</a>
        <span>|</span>
        <a href="#">友情链接</a>
    </div>
    <p>陕ICP备20007993 校园生活信息网</p>
    <p>如在使用过程中有什么问题，请致电工作人员：18591086232</p>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/slideshow.js"></script>
<script type="text/javascript">
    BCSlideshow('focuspic');
    var oFruit = document.getElementById('fruit_more');
    var oShownum = document.getElementById('show_count');

    var hasorder = localStorage.getItem('order_finish');

    if(hasorder)
    {
        oShownum.innerHTML = '2';
    }

    oFruit.onclick = function(){
        window.location.href = 'list.html';
    }
</script>
</body>

</html>
